<!DOCTYPE html>
<html lang="en">

<head>
    <title>浙江省环保院</title>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="/epi/assets/css/bootstrap.min.css" />
    <!-- 基础样式 -->
    <link rel="stylesheet" href="/epi/assets/css/matrix-style.css" />
    <!-- 皮肤 -->
    <link rel="stylesheet" href="/epi/assets/css/matrix-media.css" />
    <!-- 字体图标 -->
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_nmgh27o42027qfr.css" />
    <!-- 样式 -->
    <link rel="stylesheet" href="/epi/assets/css/roleMan.css" />
    <!-- datatable -->
    <!-- <link rel="stylesheet" href="/epi/epi/epi/epi/assets/css/foundation-datepicker.min.css"> -->
</head>

<body>
    <!--Header-part-->
    <div id="header">
        <p class="header-text">浙江省环保院</p>
        <h1><a href="index.html">浙江省环保院</a></h1>
    </div>
    <!--close-Header-part-->
    <!--top-Header-menu-->
    <div id="user-nav" class="navbar navbar-inverse head-nav">
        <ul class="nav">
            <li class="dropdown" id="profile-messages">
                <a title="" href="#" data-toggle="dropdown" data-target="#profile-messages" class="dropdown-toggle">
                    <i class="iconfont icon-user"></i>
                    <span class="text">管理员</span><b class="caret"></b></a>
                <!-- <button onclick = "test()">test</button> -->
                <ul class="dropdown-menu">
                    <li><a href="#"><i class="icon-user"></i>个人设置</a></li>
                    <li class="divider"></li>
                    <li><a href="#"><i class="icon-user"></i>修改密码</a></li>
                    <li class="divider"></li>
                    <li><a href="#"><i class="icon-check"></i>切换账号</a></li>
                </ul>
            </li>
        </ul>
    </div>
    <!--close-top-Header-menu-->
    <!--sidebar-menu-->
    <div id="sidebar">
        <ul>
            <li class="active">
                <a href="/epi/depart"> <i class="iconfont icon-home"></i> <span>部门管理</span>
                </a>
            </li>
            <li>
                <a href="#"> <i class="icon icon-signal"></i> <span>员工管理</span>
                </a>
            </li>
            <li>
                <a href="/epi/admin/role/"> <i class="icon icon-inbox"></i> <span>角色管理</span>
                </a>
            </li>
            <li>
                <a href="/epi/admin/view/"> <i class="icon icon-th"></i> <span>视图管理</span>
                </a>
            </li>
            <li>
                <a href="/epi/admin/IPIndex/"> <i class="icon icon-fullscreen"></i> <span>项目设置</span>
                </a>
            </li>
        </ul>
    </div>
    <!--sidebar-menu-->
    <!--main-container-part-->
    <div id="content" class="clearfix">
        <!-- table -->
        <div class="table-div-relative this-table">
            <button class="btn btn-add">添加角色</button>
            <div class="table-div">
                <table class="table">
                    <thead>
                        <tr>
                            <th>角色名</th>
                            <th>分配权限</th>
                            <th class="operate">操作</th>
                        </tr>
                    </thead>
                    <tbody class="role-body">
                    </tbody>
                </table>
            </div>
        </div>
        <!-- End-table -->
        <!-- modal -->
        <!-- add-modal 添加角色-->
        <div class="add-modal widget-box span9">
            <div class="widget-title">
                <span class="icon iconfont icon-remove">
            </span>
                <h5>角色管理</h5>
            </div>
            <div class="widget-content clearfix">
                <div class="form-control">
                    <span class="input-title">角色名:</span>
                    <input type="text" value="" class="role-name input-text">
                </div>
                <div class="form-control">
                    <span class="input-title">权限:</span>
                    <div class="checkbox-div">
                    </div>
                </div>
                <div class="submit-add">
                    <input class="btn btn-add-submit" type="button" name="" value="确定">
                </div>
            </div>
        </div>
        <!-- End-add-modal -->
        <!-- link-modal -->
        <div class="link-modal widget-box span12">
            <div class="widget-title">
                <span class="icon iconfont icon-remove">
            </span>
                <h5>关联员工</h5>
            </div>
            <div class="widget-content clearfix">
                <div class="btn-group staff-type">
                    <button class="btn active">已关联员工</button>
                    <button class="btn">未关联员工</button>
                </div>
                <div class="search-div btn-group">
                    <input type="search" name="" class="search-input">
                    <input type="button" name="" value="搜索" class="search-btn btn">
                </div>
                <div class="staff-choise table center-block" style="width: 100%">
                    <table class="staff-all">
                    </table>
                </div>
                <div class="paging">
                    <button class="pre">上一页</button>
                    <button class="next">下一页</button>
                    <span style="display: inline-block;margin:0 20px;">共<span class="total-page-num">10</span>页，当前第<span class="crt-page-num">2</span>页</span>
                    <div class="skip-page">
                        <span>跳转至第</span>
                        <input type="number" name="go" class="goPage"><span>页</span>
                        <input type="button" name="" class="go-btn" value="go" style="margin-left: 5px;">
                    </div>
                    <!-- <ul class="pagelist" id="page-nav">
                        <li class="nextEle page-btn upPage">&lt;</li>
                        <li class="ele on">1</li>
                        <li class="ele">2</li>
                        <li class="ele">3</li>
                        <li class="ele">4</li>
                        <li class="ele">5</li>
                        <li class="ele">6</li>
                        <li class="ele">7</li>
                        <li class="ele">8</li>
                        <li class="ele page-btn downPage">&gt;</li>
                        <span>3/10页</span>
                        <div class="skip-page">
                            <input type="number" name="go" class="goPage"><input type="button" name="" class="go-btn" value="go">
                        </div>

                    </ul> -->
                </div>
                <div class="submit-add">
                    <!-- <input class="btn add-account" name="" type="button" value="分配账号"> -->
                    <input class="btn btn-link" type="button" name="" value="取消关联">
                    <input type="button" class="btn btn-submit" value="确定">
                </div>
            </div>
        </div>
        <!-- End-link-modal -->
        <!-- account-modal -->
        <div class="account-modal widget-box span6">
            <div class="widget-title">
                <h5>分配账号</h5>
            </div>
            <div class="widget-content clearfix">
                <div class="accounts-outer">
                    <h5 class="account-title">陈奕迅</h5>
                    <div class="form-control">
                        <span class="input-title">账号:</span>
                        <input type="text" value="" class="m-account input-text">
                    </div>
                </div>
                <div class="submit-add">
                    <span>分配账号后请提醒员工尽快修改密码</span>
                    <input class="btn account-cancel" type="button" name="" value="取消">
                    <input class="btn btn-account" type="button" name="" value="确定">
                </div>
            </div>
        </div>
        <!-- End-account-modal -->
        <!-- confirm-modal -->
        <div class="confirm-modal span5">
            <p class="confirm-text">是否确认删除?</p>
            <div class="clearfix">
                <input type="button" name="" value="确定" class="confirm-btn">
                <input type="button" name="" value="取消" class="confirm-cancel">
            </div>
        </div>
        <!-- End-confirm-modal -->
        <div class="alert-modal"></div>
        <!-- End-modal -->
    </div>
    <div class="mask"></div>
    <!-- hidden-input -->
    <input type="hidden" name="" class="thisID-input" value="1">
    <input type="hidden" name="" class="linkPage-input" value="1">
    <!-- end-hidden-input -->
    <!--Footer-part-->
    <div class="row-fluid">
        <div id="footer" class="span12"> 2016 &copy; 浙江省环保院 By <a href="http://themedesigner.in/">浙江工商大学</a> </div>
    </div>
    <!--end-Footer-part-->
    <script src="/epi/assets/js/jquery-3.1.1.min.js"></script>
    <script src="/epi/assets/cyfjs/global.js"></script>
    <script src="/epi/assets/js/handlebars.min.js"></script>
    <script src="/epi/assets/js/bootstrap.min.js"></script>
    <script src="/epi/assets/js/matrix.js"></script>
    <script src="/epi/assets/js/roleMan.js"></script>
    <!-- <script src="/epi/epi/epi/epi/assets/js/foundation-datepicker.min.js"></script>
    <script src="/epi/epi/epi/epi/assets/js/foundation-datepicker.zh-CN.js"></script> -->
    <script type="text/javascript">
    function goPage(newURL) {
        if (newURL != "") {
            if (newURL == "-") {
                resetMenu();
            } else {
                document.location.href = newURL;
            }
        }
    }

    function resetMenu() {
        document.gomenu.selector.selectedIndex = 2;
    }
    </script>
</body>
<script type="text/javascript">
function goPage(newURL) {
    if (newURL != "") {
        if (newURL == "-") {
            resetMenu();
        } else {
            document.location.href = newURL;
        }
    }
}

function resetMenu() {
    document.gomenu.selector.selectedIndex = 2;
}
</script>
</body>
<script id="table-template" type="text/x-handlebars-template">
    {{#each this}}
    <tr>
        <td>{{roleName}}</td>
        <td>{{#with permissions}} {{#each this}}
            <span>{{Name}}</span> {{/each}} {{/with}}
        </td>
        <th class="operate">
            <button class="drop-left">操作>></button>
            <div class="drop-left-menu">
                <li class="link-role">关联员工
                    <!-- <input type="hidden" name="" value="{{id}}" class="role-id"> -->
                    <input type="hidden" name="" value="{{id}}" class="role-id">
                </li>
                <li class="edit-role">
                    编辑角色信息 {{#with permissions}}
                    <input type="hidden" name="" value="{{#each this}}{{id}}-{{/each}}" class="permiss-val"> {{/with}}
                    <input type="hidden" name="" value="{{id}}" class="role-id">
                </li>
                <li class="delete-role">删除角色
                    <input type="hidden" name="" value="{{id}}" class="role-id">
                </li>
            </div>
        </th>
    </tr>
    {{/each}}
</script>
<script id="premiss-template" type="text/x-handlebars-template">
    {{#each this}}
    <div class="check-div">
        <div class="checked premiss-checked">
            <input type="checkbox" id="cb_{{@index}}" class="check-input" data-id="{{id}}">
        </div>
        <label for="cb_{{@index}}" class="check-title">{{Name}}</label>
    </div>
    {{/each}}
</script>
<script id="link-staff-template" type="text/x-handlebars-template">
    <thead>
        <tr>
            <th>
                <div class="checked">
                    <input type="checkbox" class="check-input">
                </div>
            </th>
            <th>姓名</th>
            <th>员工编号</th>
            <th>职称</th>
            <th>职位</th>
            <th>账号</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody class="staff-body">
        {{#each this}}
        <tr>
            <td>
                <div class="checked staff-checked">
                    <input type="checkbox" class="check-input">
                </div>
                <input type="hidden" name="" value="{{id}}" class="person-id">
            </td>
            <td>{{name}}</td>
            <td>{{id}}</td>
            <td>{{positionalTitles}}</td>
            <td>{{position}}</td>
            <td>{{#with accounts}} {{#each this}}{{username}} {{/each}} {{/with}}</td>
            <td>
                <button class="btn edit-password btn-warning" data-id="{{id}}">重置密码</button>
            </td>
        </tr>
        {{/each}}
    </tbody>
</script>
<script id="not-link-staff-template" type="text/x-handlebars-template">
    <thead>
        <tr>
            <th>
                <div class="checked">
                    <input type="checkbox" class="check-input">
                </div>
            </th>
            <th>姓名</th>
            <th>员工编号</th>
            <th>职称</th>
            <th>职位</th>
            <th>联系方式</th>
            <th>创建时间</th>
        </tr>
    </thead>
    <tbody class="staff-body">
        {{#each this}}
        <tr>
            <td>
                <div class="checked staff-checked" data-id="{{id}}" data-name={{name}}>
                    <input type="checkbox" class="check-input">
                </div>
            </td>
            <td>{{name}}</td>
            <td>{{id}}</td>
            <td>{{position}}</td>
            <td>{{positionalTitles}}</td>
            <td>{{phone}}</td>
            <td>{{createTime}}</td>
        </tr>
        {{/each}}
    </tbody>
</script>
<script id="account-template" type="text/x-handlebars-template">
    <div class="form-control">
        <span class="input-title">账号:</span>
        <input type="text" value="" class="m-account input-text">
    </div>
</script>

</html>
